package com.autumn.annotations.ioclife.jsr250;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * ClassName: Dog
 *
 * @Description:
 * @Author: wangqiuyang
 * @Date: 2022/1/25 2:53 下午
 * History:
 * <author>          <time>          <version>          <desc>
 * wangqiuyang    2022/1/25 2:53 下午   @Version 1.0        描述
 */
@Component
public class Dog {

    public Dog() {
        System.out.println("jsr205 ... dog ... new");
    }

    /**
    * Description: bean创建并赋值之后
    * @param
    * @return: void
    * @author: wangqiuyang
    * @Date: 2022/1/25 2:55 下午
    */
    @PostConstruct
    public void init() {
        System.out.println("jsr205 ... dog ... @PostConstruct");
    }

    /**
    * Description: bean被销毁之后
    * @param
    * @return: void
    * @author: wangqiuyang
    * @Date: 2022/1/25 2:55 下午
    */
    @PreDestroy
    public void destroy() {
        System.out.println("jsr205 ... dog ... @PreDestroy");
    }
}
